<?php

namespace App\Http\Controllers\Api\Website;


use App\AlishiForm;
use App\Http\Requests\AlishiFormRequest;
use App\Http\Resources\Industry;
use App\WorkshopIndustry;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;

class IndustryController extends Controller
{
    public function index(){

        $industry=WorkshopIndustry::all();
        return new Industry($industry);
    }
    public function submit(AlishiFormRequest $request){
        $alishi=new AlishiForm();
        $alishi->industry=$request->industry;
        $alishi->city=$request->city;
        $alishi->username=$request->username;
        $alishi->mobile=$request->mobile;
        $alishi->href='http://m.qalex.com/count';
        $alishi->save();
        return response()->json([
            'code'=>0,
            'data'=>'提交成功'
        ]);
    }
}
